package main

import "fmt"

type Person struct {
	Name  string
	Age   int
	Email string
}

func StructDemo() {
	p := Person{
		Name:  "Inkka",
		Age:   17,
		Email: "inkkaplumbilibili@example.com",
	}

	p2 := Person{
		"jack",
		18,
		"1234421@qq.com",
	}
	fmt.Println(p2)

	// 访问结构体字段
	fmt.Println("Name:", p.Name)
	fmt.Println("Age:", p.Age)
	fmt.Println("Email:", p.Email)

	// 修改结构体字段
	p.Age = 18
	fmt.Println("Updated Age:", p.Age)
}
